/**
 * 在demo1的基础上，希望在console的前面一行加入console位置信息。所以这里不再是修改函数参数了
 * https://juejin.cn/book/6946117847848321055/section/6945997926376144899
 * */
 const { transformFileSync } = require('@babel/core');
 const plugin = require('./plugin');
 const path = require('path');
 
 const { code } = transformFileSync(path.join(__dirname, './index.js'), {
     plugins: [plugin],
     parserOpts: {
         sourceType: 'unambiguous',
         plugins: ['jsx']       
     }
 });
 
 console.log(code);